Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FancyZones Editor] Quick layout switch hotkeys #10437

Merged
merged 11 commits into from
Mar 25, 2021

Conversation

SeraphimaZykova
Copy link
Collaborator

Summary of the Pull Request

What is this about:

Layouts can be quickly changed by the hotkey Win + Ctrl + Alt + number. Another way to quickly switch layout is during the window dragging press a number assigned to the layout.
The feature could be enabled/disabled in the FancyZones settings along with the flashing zones option.

image

The number is defined by the user in the FancyZones Editor.
Hotkeys could be assigned to custom layouts.

image

What is include in the PR:

  • Created UI to select a value from 0 to 9 to bind the current layout to the shortcut.
  • Add the schema element to zones-settings.json.
  • Swap the current layout with the layout bound to the selected shortcut.
  • Flash the new layout for 1 second.
  • Added an option to turn off the keyboard hook for this feature since it might conflict with existing apps.
  • Added option to turn off the zone flashing when switching layout.
  • Added telemetry.

How does someone test / validate:

Quality Checklist

Contributor License Agreement (CLA)

A CLA must be signed. If not, go over here and sign the CLA.

SeraphimaZykova and others added 11 commits March 25, 2021 14:22
* Started work

* Do not swallow the key press, for now

* Use Alt+Shift, check whether to swallow the key

* The feature works, now we need to integrate settings

* Use settings to disable switching

* Flashing has some bugs

* Fix concurrency bugs

* Remove unused function

* Add tracing to Flash()

* There are still concurrency bugs

* Removed unused code. There are more MT bugs still, don't review yet

* Require locks in various places

* Satisfy the spell checker

* Add support for numpad keys, changing layout while dragging

* Add helper functions

* Move flash check

* Implement and use GetWorkAreaFromCursor

* Enable single key switch while dragging a window
#10409)

* Update device info when setting custom zone sets

* Add telemetry call
* Update resource string

* Update key order
@SeraphimaZykova SeraphimaZykova added FancyZones-Editor Issue revolving the FancyZone Editor FancyZones-Hotkeys Issue around shortcut keys in FancyZones Product-FancyZones Refers to the FancyZones PowerToy labels Mar 25, 2021
@SeraphimaZykova SeraphimaZykova merged commit 13c4c18 into master Mar 25, 2021
@SeraphimaZykova SeraphimaZykova deleted the feature/fz-editor-layout-hotkeys branch March 25, 2021 12:45
enricogior pushed a commit that referenced this pull request Mar 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FancyZones-Editor Issue revolving the FancyZone Editor FancyZones-Hotkeys Issue around shortcut keys in FancyZones Product-FancyZones Refers to the FancyZones PowerToy
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants